import request from '@/utils/request'

// 查询教室信息列表
export function listRooms(query) {
  return request({
    url: '/edu/rooms/list',
    method: 'get',
    params: query
  })
}

export function listAllRooms(query) {
  return request({
    url: '/edu/rooms/listAll',
    method: 'get',
    params: query
  })
}

// 查询教室信息详细
export function getRooms(roomId) {
  return request({
    url: '/edu/rooms/' + roomId,
    method: 'get'
  })
}

// 新增教室信息
export function addRooms(data) {
  return request({
    url: '/edu/rooms',
    method: 'post',
    data: data
  })
}

// 修改教室信息
export function updateRooms(data) {
  return request({
    url: '/edu/rooms',
    method: 'put',
    data: data
  })
}

// 删除教室信息
export function delRooms(roomId) {
  return request({
    url: '/edu/rooms/' + roomId,
    method: 'delete'
  })
}

// 导出教室信息
export function exportRooms(query) {
  return request({
    url: '/edu/rooms/export',
    method: 'get',
    params: query
  })
}